<template>
	<view class="detail">
		<view class="title">
			{{info.Title}}
		</view>
		<view class="time">
			{{info.time}}
		</view>
		<!-- 不需要引入，可直接使用 -->
		<view>
			<mp-html :content="info.Content" read-only="true" :tag-style="tagStyle"/>
		</view>
	</view>
</template>

<script>

export default {
	data(){
		return{
			id:'',
			html: '<img src="https://petgoo.oss-cn-shenzhen.aliyuncs.com/ads/20231221164053.jpg"></img>',
			info:{},
			tagStyle:{
				image:'height:500rpx;width:90vw'
			}
		}
	},
	onLoad(e){
		this.id = e.id
		this.GetDetail()
	},
	methods:{
		async GetDetail(){
			let res = await this.$api.post('Content/GetContent', {
				ID: this.id
			});
			this.info = res.data;
			this.info.time = res.data.CreateTime;
			
		}
	}
}
</script>

<style lang="scss">
page{
	background-color: #fff;
}
.detail{
	padding: 20rpx 55rpx;
	.title{
		font-size: 38rpx;
		font-weight: bold;
		margin: 10rpx 0;
	}
	.time{
		font-size: 24rpx;
		display: flex;
		// justify-content: center;
		margin: 10rpx 0;
		padding-bottom: 20rpx;
		border-bottom:2rpx solid #ccc ;
		color: #999;
	}
	// image{
	// 	width: 100%;
	// 	height: 100%;
	// }
}
</style>